//
//  LYHomeViewController.swift
//  Swift---新浪微博练习代码
//
//  Created by Mr.Yan on 2017/6/28.
//  Copyright © 2017年 Mr.Yan. All rights reserved.
//

import UIKit

class LYHomeViewController: LYBaseViewController {
//    override func loadView() {
//        view = LYVisitorView()
//    }
    override func viewDidLoad() {
        super.viewDidLoad()
        // 如果用户没有登录 设置信息

        if !isLogin{
        
            visitorView?.setupVisitorViewInfo(imageName: nil, title: nil)
            return
        }
        setupUI()
 
    }
    
    private func setupUI(){
        setupNav()
    }
    private func setupNav(){
    //左侧按钮
        navigationItem.leftBarButtonItem = UIBarButtonItem(imageName: "navigationbar_pop", title: nil, tager: self, action: #selector(leftButtonClick))
    //右侧按钮
        navigationItem.rightBarButtonItem = UIBarButtonItem(imageName: "navigationbar_friendsearch", title: nil, tager: self, action: #selector(rightButtonClick))
    }
    @objc private func leftButtonClick(){
    
    }
    @objc private func rightButtonClick(){
    let tempVC = LYTempViewController()
//        tempVC.hidesBottomBarWhenPushed = false
        navigationController?.pushViewController(tempVC, animated: true)
    }
}
